package top.ucat.boots.starter.oauth2.server.factory.base;

import top.ucat.boots.starter.oauth2.client.entity.OauthUserCredentials;

/**
 * @Auther: Jun
 * @Date: 2019/9/3 18:05
 * @Description:
 */
public interface LoginFactory {


    /**
     * 获取用户登录凭证
     *
     * @param userCode
     * @param userCodeType
     * @param systemType
     * @return
     */
    public OauthUserCredentials getUserCredentials(String userCode, String userCodeType, String systemType);

    /**
     * 注册用户登录凭证
     *
     * @param userId
     * @param userCode
     * @param userCodeType
     * @param systemType
     * @return
     */
    public OauthUserCredentials registerUserCredentials(String userId, String userCode, String userCodeType, String systemType);

    /**
     * 注册用户登录凭证
     *
     * @param userId
     * @param userCode
     * @param userCodeType
     * @param systemType
     * @param isCheck      是否检查凭证是否存在,做凭证重复检测
     * @return
     */
    public OauthUserCredentials registerUserCredentials(String userId, String userCode, String userCodeType, String systemType, boolean isCheck);

    public Object registerUser(String userId, String userCode, String userCodeType, String systemType);

}
